﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：InstockDetailedVM
// 文件功能描述：食材明细实体VM
//
// 
// 创建标识：2012-02-01 zhou
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Model.WaiGaoQiao;

namespace WaiGaoQiaoWeb.Models
{
    public class InstockDetailedVM
    {
        [Display(Name = "ID自增")]       
        public int? ID
        {
            get;
            set;
        }

        [Display(Name = "入库日期")]
        public DateTime InstockDt
        {
            get;
            set;
        }

        [Display(Name = "仓库")]
        [Remote("CheckWarehouse_ID", "Instock", AdditionalFields = "Warehouse_ID", HttpMethod = "POST", ErrorMessage = "请选择一个仓库")]
        public int Warehouse_ID
        {
            get;
            set;
        }

        [Display(Name = "班组")]
        [Remote("CheckGroup_ID", "Instock", AdditionalFields = "Group_ID", HttpMethod = "POST", ErrorMessage = "请选择一个班组")]
        public int Group_ID
        {
            get;
            set;
        }

        [Display(Name = "食材")]
        [Required(ErrorMessage = "食材ID不能为空")]
        public int Goods_ID
        {
            get;
            set;
        }

        [Display(Name = "数量")]
        [RegularExpression(@"^[0-9]+(.[0-9]{0,3})?$", ErrorMessage = "数量必须为正整数或小数")] 
        public decimal Count
        {
            get;
            set;
        }

        [Display(Name = "价格")]
        [RegularExpression(@"^[0-9]+(.[0-9]{0,3})?$", ErrorMessage = "价格必须为正整数或小数")] 
        public decimal Price 
        { 
            get;
            set;
        }

        [Display(Name = "金额")]
        //[RegularExpression(@"^[0-9]+(.[0-9]{0,3})?$", ErrorMessage = "价格必须为正整数或小数")]      
        public decimal Amount
        {
            get;
            set;
        }
        [Display(Name = "供应商")]
        //[Remote("CheckSupplier_ID", "Instock", AdditionalFields = "Supplier_ID", HttpMethod = "POST", ErrorMessage = "请选择一个供应商")]
        public int Supplier_ID 
        { 
            get;
            set;
        }

        [Display(Name = "记录时间")]
        public DateTime RecordDateTime
        {
            get;
            set;
        }

        [Display(Name = "经办人")]        
        public string OperatorID
        {
            get;
            set;
        }
        [Display(Name = "批号")] 
        public string OrderNo
        {
            get;
            set;
        }
        [Required(ErrorMessage = "食材不能为空")]
        public string Goods_ID1
        {
            get;
            set;
        }
    }
}
